#include "verifydlg.h"
#include "ui_verifydlg.h"

VerifyDlg::VerifyDlg(QWidget *parent) :
    QDialog(parent),
    ui(new Ui::VerifyDlg)
{
    ui->setupUi(this);
    connect(ui->txtVerify, SIGNAL(textChanged(QString)), this, SLOT(codeChanged()));
}

void VerifyDlg::setImage(QString user, QPixmap img)
{
    ui->gvVerify->setPixmap(img);
    ui->txtUser->setText(user);
}

VerifyDlg::~VerifyDlg()
{
    delete ui;
}

void VerifyDlg::codeChanged()
{
    code = ui->txtVerify->text();
}

void VerifyDlg::changeEvent(QEvent *e)
{
    QDialog::changeEvent(e);
    switch (e->type()) {
    case QEvent::LanguageChange:
        ui->retranslateUi(this);
        break;
    default:
        break;
    }
}
